import { useLocale, useOptions } from "@/hooks"

import GameListSelect from "../../common/gameListSelect"

const GameTypeId = ({
	allowClear = false,
	formName = "gameTypeId",
	modal = "gameTypes",
	...props
}: {
	props?: object
	allowClear?: boolean
	modal?: string
	formName?: string
}) => {
	const { formatMessage } = useLocale()
	const options = useOptions({ modal, func: formatMessage })

	return (
		<GameListSelect
			name={formName}
			labelId="dxn.card_ables_list.game_name"
			placeholderId="dxn.card_ables_list.game_name_placeholder"
			options={options}
			allowClear={allowClear}
			{...props}
		/>
	)
}

export default GameTypeId
